#ifndef DLGINFLATION_H
#define DLGINFLATION_H

#include <QtCore>
#include <QtGui>
#include "ui_dlginflation.h"

#include "qextserialport.h"

#include "telemetrycommands.h"
#include "telemetryparser.h"
#include "inflationdata.h"

class QextSerialPort;

class DlgInflation : public QDialog
{
	Q_OBJECT

public:
	DlgInflation(QWidget *parent = 0);
	~DlgInflation();

private:
	Ui::DlgInflationClass ui;
    bool m_bSequenceOn;

private slots:
	void update(InflationData data);
	void advanceWidgets();///debug function to throw some random data onto the screen

private slots://for the buttons
	void exitManualMode(const bool exit = true);
	void openHoseClamp(const bool open = true);
	void openInflationValve(const bool open = true);
	void openMainTankValve(const bool open = true);
	void openThrusterValve(const bool open = true);

private:
	//int initFiles();
	//int initPort();
private slots:
	//int readPort();
	//int writePort();//not used

private:
	QFile* m_inFile,
           *m_outFile;
    QString m_strInFileName,
            m_strOutFileName;
	QTimer* m_pollTimer;
	QextSerialPort* m_serial;
	QDataStream* m_outStream,
                 *m_inStream;
	TelemetryParser* m_telemetryParser;

public:
	void setSerialPort(QextSerialPort* m_port);
    void keyPressEvent ( QKeyEvent * event ) ;
};

#endif // DLGINFLATION_H
